/*
 * Copyright 2009-2015 by WWW.KNET.CN  All rights reserved.
 */

package cn.knet.sp.ncrm.modules.sys.producttype.entity;

import org.hibernate.validator.constraints.Length;

import java.util.Date;

import javax.validation.constraints.NotNull;

import cn.knet.sp.ncrm.common.persistence.DataEntity;

/**
 * 产品类型crudEntity
 *
 * @author zhangbin
 * @version 2015-08-24
 */
public class ProductType extends DataEntity<ProductType> {

	private static final long serialVersionUID = 1L;
	private String productTypeName;        // 产品名称
	private String productTypeValue;        // 产品值 WLK KEYWORD等
	private String serviceUrl;        // 服务地址
	private String status;        // 可用状态 OPEN CLOSE
	private String description;        // 描述信息
	private Integer oldTypeid;        // 老类型ID(作用未知)

	private Long version;        // 版本(无用)
	private Date dateCreated;        // 创建日期
	private Date lastUpdated;        // 更新日期

	public ProductType() {
		super();
	}

	public ProductType(String id) {
		super(id);
	}

	@Length(min = 1, max = 64, message = "产品名称长度必须介于 1 和 64 之间")
	public String getProductTypeName() {
		return productTypeName;
	}

	public void setProductTypeName(String productTypeName) {
		this.productTypeName = productTypeName;
	}

	@Length(min = 1, max = 64, message = "产品类型标签长度必须介于 1 和 64 之间")
	public String getProductTypeValue() {
		return productTypeValue;
	}

	public void setProductTypeValue(String productTypeValue) {
		this.productTypeValue = productTypeValue;
	}


	@Length(min = 0, max = 255, message = "服务地址长度必须介于 0 和 255 之间")
	public String getServiceUrl() {
		return serviceUrl;
	}

	public void setServiceUrl(String serviceUrl) {
		this.serviceUrl = serviceUrl;
	}

	@Length(min = 0, max = 64, message = "描述信息长度必须介于 0 和 64 之间")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@NotNull(message = "开通状态不能为空")
	public String getStatus() {
		return status;
	}

	public Integer getOldTypeid() {
		return oldTypeid;
	}

	public void setOldTypeid(Integer oldTypeid) {
		this.oldTypeid = oldTypeid;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	public Date getDateCreated() {
		return dateCreated;
	}

	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}

	public Date getLastUpdated() {
		return lastUpdated;
	}

	public void setLastUpdated(Date lastUpdated) {
		this.lastUpdated = lastUpdated;
	}

}